<!--
 * @Descripttion: 
 * @Author: zhanyi
 * @Date: 2021-10-22 15:26:37
 * @FilePath: \wczd-mobile\src\pages\component\sxwh-radio\sxwh-radio.vue
-->
<template>
  <evanRadioGroup style="display:flex" @change="onGroupChange">
    <view style="margin-right:20upx">
      <evanRadio v-model="iconValue" :label="raidoData[0]">
        <text :style="{color:iconValue===raidoData[0]?'#F54A13':'#8D9093'}">{{raidoData[0]}}</text>
        <template slot="icon">
          <image v-if="iconValue===raidoData[0]" src="@/static/wczd/wrong.png" alt=""></image>
          <image v-if="iconValue!==raidoData[0]" src="@/static/wczd/normal.png" alt=""></image>
        </template>
      </evanRadio>
    </view>
    <view>
      <evanRadio v-model="iconValue" :label="raidoData[1]">
        <text :style="{color:iconValue===raidoData[1]?'#009FDF':'#8D9093'}">{{raidoData[1]}}</text>
        <template slot="icon">
          <image v-if="iconValue===raidoData[1]" src="@/static/wczd/real.png" alt=""></image>
          <image v-if="iconValue!==raidoData[1]" src="@/static/wczd/normal.png" alt=""></image>
        </template>
      </evanRadio>
    </view>
  </evanRadioGroup>
</template>

<script>
import evanRadio from "@/components/evan-radio/evan-radio.vue";
import evanRadioGroup from "@/components/evan-radio-group/evan-radio-group.vue";

export default {
  name: 'sxwh-radio',
  components: { evanRadio, evanRadioGroup },
  props: {
    raidoData: {
      type: Array,
      default: []
    }
  },
  data () {
    return {
      iconValue: ''
    }
  },
  computed: {},
  mounted () { },
  watch: {},
  methods: {
    onGroupChange (e) {
      this.$emit('_raidoBack', e)
    }
  },
}
</script>

<style scoped lang="scss">
image {
  width: 56upx;
  height: 56upx;
}
</style>
